package com.charles.export;


import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.charles.export.annotation.Column;
import com.charles.export.annotation.Export;

@Export(sheetName = "teacher")
public class Teacher {
	private String name;
	private int age;
	private String zhicheng;
	private String hobby;
	private double salay;
	private String course;
	private String address;
	private boolean isMarryed;
	private String educationLevel;
	private Date birthday;

	@Column(pos=1,head="老师姓名")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	@Column(pos=3,head="年龄")
	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}
	@Column(pos=2,head="职称")
	public String getZhicheng() {
		return zhicheng;
	}

	public void setZhicheng(String zhicheng) {
		this.zhicheng = zhicheng;
	}
	@Column(pos=4,head="兴趣爱好")
	public String getHobby() {
		return hobby;
	}

	public void setHobby(String hobby) {
		this.hobby = hobby;
	}
	@Column(pos=5,head="薪水")
	public double getSalay() {
		return salay;
	}

	public void setSalay(double salay) {
		this.salay = salay;
	}
	@Column(pos=6,head="所授课程")
	public String getCourse() {
		return course;
	}

	public void setCourse(String course) {
		this.course = course;
	}
	@Column(pos=7,head="家庭住址")
	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}
	
	public boolean isMarryed() {
		return isMarryed;
	}
	@Column(pos=8,head="是否结婚")
	public String getShowIsMarryed() {
		if (isMarryed) {
			return "已婚";
		}else {
			return "未婚";
		}
	}

	public void setMarryed(boolean isMarryed) {
		this.isMarryed = isMarryed;
	}

	@Column(pos=9,head="教育水平")
	public String getEducationLevel() {
		return educationLevel;
	}

	public void setEducationLevel(String educationLevel) {
		this.educationLevel = educationLevel;
	}

	
	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}
	@Column(pos=10,head="出生年月")
	public String getShowBirthday() {
		DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
		return format.format(birthday);
	}

}
